package com.dayi.fragment.child;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.dayi.R;
import com.dayi.R2;
import com.lib.ui.fragment.kit.BaseFragment;

import butterknife.BindView;
import butterknife.OnClick;

public class ShowActivityFragment extends BaseFragment {


    @BindView(R2.id.iv_hideshow)
    ImageView ivHideshow;
    @BindView(R2.id.fl_show)
    FrameLayout flShow;
    @BindView(R2.id.btn_showdetail)
    Button btnShowdetail;

    @Override
    protected void onCreateView(View view, Bundle savedInstanceState) {


    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_showactivity;
    }


    @OnClick({R2.id.iv_hideshow, R2.id.btn_showdetail})
    public void onViewClicked(View view) {
        int i = view.getId();
        if (i == R.id.iv_hideshow) {

            if (showActivityClickListener != null) {
                flShow.setVisibility(View.GONE);
                showActivityClickListener.hideShow();
            }


        } else if (i == R.id.btn_showdetail) {

            if (showActivityClickListener != null) {

                showActivityClickListener.getDetail();

            }

        }
    }


    public ShowActivityClickListener showActivityClickListener;

    public interface ShowActivityClickListener {

        void hideShow();

        void getDetail();

    }

    public void setShowActivityClickListener(ShowActivityClickListener showActivityClickListener) {

        this.showActivityClickListener = showActivityClickListener;

    }

}
